/*
A TestCase is a collection of TestMethods that share a common test environment. 
When using FlexUnit4, each TestCase can have a [Before] and [After] metadata tags 
that can be used to decorate methods you want to run before and/or after each test method. 

These metadatas simulate the setUp() and tearDown() methods of Fluint and FlexUnit .9. 
So, for example, if you wanted to write a series of TestMethods to test the Flex Timer 
class, they could all exist in a single TestCase. In the method decorated with [Before] 
you would create a Timer instance to test use in your tests. In the method decorated 
with [After], you would stop that timer and remove references so it can be garbage 
collected. Additionally, you may decorate any number of static methods per class with 
the medatadata [BeforeClass] and [AfterClass]. 

These methods will be run once per test class.

For example, if your TestCase has two TestMethods, the FlexUnit4 framework would execute 
the TestCase in the following way:

1. [BeforeClass]
2. [Before]
3. [Test]
4. [After]
5. [Before]
6. [Test]
7. [After]
8. [AfterClass] 

* The [Before] method is run before every TestMethod and the [After] method is run 
after every TestMethod. 

Note: In a TestCase tests may be executed in ANY order. 
If you would like to specify an order to the tests, you may do so

see for more info: http://docs.flexunit.org/index.php?title=Main_Page
*/

package suite.test
{
	import org.flexunit.Assert;

	import org.as3commons.logging.ILogger;
	import org.as3commons.logging.LoggerFactory;
	
	public class ExampleTestCaseShould
	{
		public static const LOGGER : ILogger = LoggerFactory.getClassLogger(ExampleTestCaseShould);
		
		public function ExampleTestCaseShould()
		{
		}
		
		private var count:int = 0;		
		
		[Before]
		public function setUp():void {   
			count = 10;
			LOGGER.info( "setUp");
		}   
		
		[After]  
		public function tearDown():void {   
			count = 0; 
			LOGGER.info( "tearDwon"); 
		} 
		
		[Test]  
		public function beAbleTo_performSubtraction():void { 
			Assert.assertEquals(8, count-2);  
			LOGGER.info( "subtraction");  
		}

	}
}